from django.shortcuts import render
from django.shortcuts import render, HttpResponse, HttpResponsePermanentRedirect, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.db.models import Sum
import time, json, pymysql, collections, os
from django.http import JsonResponse
from bbs import models


# Create your views here.

def index(request, Title_id):
    # print(Title_id)
    vav_list = models.Title_nav.objects.all().order_by('order')
    if not Title_id:
        Title_id=1
    return render(request, 'bbs/index.html', {"vav_list": vav_list, "Title_id": int(Title_id)})
